﻿/// <summary>
/// Developer: CHOOI KAH WAI
/// Last Modified: 15/11/2009
/// </summary>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using System.ComponentModel;

namespace ARSS.Host.Common
{
    /// <summary>
    /// Scene node class
    /// </summary>
    public class SceneNode : INotifyPropertyChanged
    {
        #region Variables

        /// <summary>
        /// Node name
        /// </summary>
        private string name;

        /// <summary>
        /// Scene node's locker nickname
        /// </summary>
        private string lockerNickname;

        #endregion

        #region Properties

        /// <summary>
        /// Node name
        /// </summary>
        public string Name
        {
            get
            {
                return this.name;
            }
            set
            {
                this.name = value;
                NotifyPropertyChanged("Name");
            }
        }

        public string Locker
        {
            get
            {
                return this.lockerNickname;
            }
            set
            {
                this.lockerNickname = value;
                NotifyPropertyChanged("Locker");
            }
        }

        /// <summary>
        /// Node's children
        /// </summary>
        public ArrayList Children { get; set; }

        #endregion

        #region Functions

        /// <summary>
        /// Constructor
        /// </summary>
        public SceneNode()
        {
            Children = new ArrayList();
            Name = "";
            Locker = "";
        }

        #endregion


        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        private void NotifyPropertyChanged(String info)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(info));
            }
        }


        #endregion
    }
}
